home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr29 / ibb126.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-03-06  |  2KB  |  70 lines

  1. /**********************************************************************
  2.  *
  3.  * Itty-Bitty Black Book/2 installation program.
  4.  *
  5.  * Version 1.26
  6.  * March 6, 1995
  7.  *
  8.  * Copyright (C) 1994-1995 by
  9.  * James E Johnson Jr.
  10.  * All Rights Reserved.
  11.  *
  12.  **********************************************************************/
  13.  
  14.  
  15. "@ECHO OFF"
  16.  
  17. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  18. call SysLoadFuncs
  19. call RxFuncAdd "SysCls", "RexxUtil", "SysCls"
  20.  
  21. arg FullPathName
  22.  
  23. if FullPathName = "" then
  24.   do
  25.     call SysCls
  26.     say ""
  27.     say "Usage:"
  28.     say " "
  29.     say "  INSTALL FullPathName"
  30.     say ""
  31.     say "  FullPathname is a combination of both the drive letter and directory path,"
  32.     say "  if the directory does not exist it will be created."
  33.     say ""
  34.     say ""
  35.     say "  Example:"
  36.     say ""
  37.     say "  INSTALL c:\apps\ibbook              -- will install IBB/2 in c:\apps\ibbook"
  38.   end
  39. else
  40.   do
  41.     call SysCls
  42.     say "Installing Itty-Bitty Black Book/2 in "FullPathName"."
  43.     rc = SysFileTree( FullPathName, "dirs", "D")
  44.     if (dirs.0 = 0) then
  45.       do
  46.         rc = SysMkDir(FullPathName)
  47.         if (rc \= 0) then
  48.           do
  49.             say "Couldn't create directory "FullPathName"."
  50.           exit
  51.         end
  52.       end
  53.     copy ibbook.exe     FullPathName ">NUL"
  54.     copy ibbook.hlp     FullPathName ">NUL"
  55.     copy ibbook.doc     FullPathName ">NUL"
  56.     copy readme.NOW     FullPathName ">NUL"
  57.     copy install.cmd FullPathName ">NUL"
  58.     rc = SysFileTree( "ibbook.key", "files", "F")
  59.     if (files.0 \= 0) then
  60.       do
  61.         copy ibbook.key FullPathName ">NUL"
  62.       end
  63.     CR = D2C(13)
  64.     rc = SysCreateObject("WPProgram", "Itty-Bitty"CR" Black Book/2", "<WP_DESKTOP>", "PROGTYPE=PM;EXENAME="FullPathname"\ibbook.exe", "REPLACE")
  65.     say "Installation complete."
  66.     say " "
  67.     say "Remember to take a look at readme.NOW"
  68.   end
  69.  
  70.